package com.test.ds.link.interiterator;

public class LinkList {
	private Link first;
	
	public Link getFirst() {
		return first;
	}

	public void setFirst(Link first) {
		this.first = first;
	}

	public LinkList(){
		first = null;
	}
	
	public boolean isEnpty(){
		return (first == null);
	}
	
	public ListIterator getIterator(){
		return new ListIterator(this);
	}
	
//	public void inserFirst(int id, double dd){
//		Link newLink = new Link(id, dd);
//		newLink.next = first;
//		first = newLink;
//	}
//	
//	public Link deleteFirst(){
//		Link temp = first;
//		first = first.next;
//		return temp;
//	}
	
	public void displayList(){
		Link current = first;
		while(current != null ){
			current.displayLink();
			current = current.next;
		}
		System.out.println("");
	}
}
